﻿using System;
using System.Collections.Generic;
using System.Text;
using X.Entity;
using System.Reflection;

namespace X.DataFactory
{
    public interface IPage
    {
        PageInfo GetPageInfo(string pageKey);
        bool Update(PageInfo pageInfo);
        IList<PageInfo> GetPageList();
        IList<PageInfo> GetPageList(string[] pageKeys);
    }

    public sealed partial class DataAccess
    {
        public static IPage CreatePage()
        {
            string typeName = path + ".Page";

            return (IPage)Assembly.Load(path).CreateInstance(typeName);
        }
    }
}
